﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Inspire.Classes.Common
{
    /// <summary>
    /// Class that stores static instances of commonly used constant values.
    /// </summary>
    public static class Constants
    {
        /// <summary>
        /// Category of custom fields for custom Patron fields.
        /// </summary>
        public const string CUSTOM_FIELD_PATRON_CUSTOM = "patron_custom";
        public const string CUSTOM_FIELD_PATRON_CUSTOM_LABEL = "Patron Custom";

        /// <summary>
        /// Category of custom fields for custom Resource fields.
        /// </summary>
        public const string CUSTOM_FIELD_RESOURCE_CUSTOM = "resource_custom";
        public const string CUSTOM_FIELD_RESOURCE_CUSTOM_LABEL = "Resource Custom";

        /// <summary>
        /// Category of custom fields for Patron contact fields.
        /// </summary>
        public const string CUSTOM_FIELD_PATRON_CONTACT = "patron_contact";
        public const string CUSTOM_FIELD_PATRON_CONTACT_LABEL = "Patron Contact";

        /// <summary>
        /// Maximum allowable image dimensions.
        /// </summary>
        public const int IMAGE_DIMENSION_THUMB_MAX_WIDTH = 32;
        public const int IMAGE_DIMENSION_THUMB_MAX_HEIGHT = 32;
        public const int IMAGE_DIMENSION_FULL_MAX_WIDTH = 250;
        public const int IMAGE_DIMENSION_FULL_MAX_HEIGHT = 250;

        /// <summary>
        /// List of the string name of the data types accepted for Custom Field Types.
        /// </summary>
        public static ArrayList CustomFieldTypeList = new ArrayList(3);

        /// <summary>
        /// Hashtable for looking up labels of Custom Field Categories.
        /// </summary>
        public static Hashtable CustomFieldCategoryLabelLookup = new Hashtable();

        /// <summary>
        /// Static constructor.
        /// </summary>
        static Constants()
        {
            // Load the Custom Field Category Labels
            Constants.CustomFieldCategoryLabelLookup.Add(CUSTOM_FIELD_PATRON_CONTACT, CUSTOM_FIELD_PATRON_CONTACT_LABEL);
            Constants.CustomFieldCategoryLabelLookup.Add(CUSTOM_FIELD_PATRON_CUSTOM, CUSTOM_FIELD_PATRON_CUSTOM_LABEL);
            Constants.CustomFieldCategoryLabelLookup.Add(CUSTOM_FIELD_RESOURCE_CUSTOM, CUSTOM_FIELD_RESOURCE_CUSTOM_LABEL);

            // Load the Custom Field Data Types
            Constants.CustomFieldTypeList.Add("String");
            Constants.CustomFieldTypeList.Add("Int32");
            Constants.CustomFieldTypeList.Add("Boolean");
        }
    }
}
